package com.ruben.simpleboot.adapter;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruben.simpleboot.pojo.common.BaseRecycleEntity;
import io.github.vampireachao.stream.core.lambda.function.SerCons;
import io.github.vampireachao.stream.core.lambda.function.SerUnOp;
import lombok.Data;

import java.util.List;
import java.util.function.Consumer;
import java.util.function.UnaryOperator;

/**
 * @author VampireAchao
 * @since 2022/10/10 11:57
 */
@Data
public class RecycleBinAdapter<T extends BaseRecycleEntity> {

    private Long offset = 0L;
    private Integer idx = -1;
    private Class<T> clazz;
    private UnaryOperator<LambdaQueryWrapper<T>> condition = SerUnOp.identity();
    private Consumer<List<T>> dataListResolver = SerCons.nothing();
    private UnaryOperator<String> orderColumnHandler = i -> null;
    private List<T> dataList;

}
